package com.gxkj.spark.helloworld.services.impl;


import com.gxkj.spark.helloworld.daos.SparkBaseDataDaoImpl;
import com.gxkj.spark.helloworld.entitys.SparkBaseData;
import com.gxkj.spark.helloworld.services.SparkBaseDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
@Service
public class SparkBaseDataServiceImpl implements SparkBaseDataService {

    @Autowired
    private  SparkBaseDataDaoImpl sparkBaseDataDao;


    public SparkBaseData doAdd(SparkBaseData entity) {
        Date anow  = new Date();

        entity.setCreatedAt(anow);
        entity.setUpdatedAt(anow);
        sparkBaseDataDao.insert(entity);
        return entity;
    }
}
